package br.com.jsfprimefaces.dao;

import java.io.Serializable;
import java.util.List;
import org.hibernate.Session;

import br.com.jsfprimefaces.model.Duracao;
import br.com.jsfprimefaces.util.BancoUtil;

public class DuracaoDAO implements Serializable{
	
	private static final long serialVersionUID = 1L;

	public List<Duracao> searchById(){
		int id=0;
		Session session = BancoUtil.getFactory().openSession();
		session.beginTransaction();
		 
		String sql = "from Duracao where cod ="+id;
		List<Duracao> list = session.createQuery(sql).list();
				
		return list;
	}
	
	
}
